using MemoryPack;
using Game.Networking.Client;

namespace Game.Networking {
	public sealed class S_ProgramConsoleCommandMessageHandler : BaseServerMessageHandler {
		public override ServerPacketID CommandId {
			get {
				return ServerPacketID.ProgramConsoleCommand;
			}
		}

		public override void ProcessMessage(byte[] rawCommand) {
			var command = MemoryPackSerializer.Deserialize<S_ProgramConsoleCommand>(rawCommand);
			ClientScriptingController.Instance.ProcessTerminalCommandFromServer(command.Command, command.CommandArgs);
		}
	}
}
